package cn.edu.xmu.oomall.comment.controller.dto;

import cn.edu.xmu.javaee.core.validation.NewGroup;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import lombok.NoArgsConstructor;


@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CommentDto {
    @NotBlank(message = "评论内容不能为空", groups = {NewGroup.class})
    private String content;
    @Min(value = 0, message = "评论类型不合法", groups = {NewGroup.class})
    @Max(value = 1, message = "评论类型不合法", groups = {NewGroup.class})
    private Byte type;
    @Min(value = 0, message = "评论状态不合法", groups = {NewGroup.class})
    @Max(value = 2, message = "评论状态不合法", groups = {NewGroup.class})
    private Byte status;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus( Byte status) {
        this.status = status;
    }
}
